home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gr2ps / PSinTeX < prev    next >
Encoding:
Text File  |  1989-05-16  |  2.0 KB  |  47 lines

  1.  
  2.         Using PostScript Illustrations in TeX
  3.  
  4.     TeX provides an unstandardized interface directly to the printer
  5. drivers to support illustartions (and possibly extensions) in a non-
  6. standard way.  This mecanism, called \special, is interpreted by the
  7. printer driver for PostScript printers to be the name of a file of
  8. PostScript code to be interpolated at that point in the document.
  9.  
  10.     When the file is being interpolated, the origin is placed at the
  11. left edge and ``current V'' in the dvi file.  This is the place where
  12. the next character will be placed if the user goes into horizontal mode.
  13. This means that you should write your PostScript programs so that
  14. the image lies along the bottom of the page, and in the center.
  15.  
  16.     Also, the PostScript files should NOT contain any showpage
  17. commands.  A copypage would be okay, but doesn't make much sense.
  18.  
  19.     Any PostScript commands are okay, even those that change the
  20. CTM, since the driver brackets the user PostScript code with
  21. gsave/grestore.  It is best though, to make sure the opstack has
  22. not been changed when your illustration is done.
  23.  
  24.     One thing to worry about; the printer driver needs to access
  25. the file by the name given (and it will NOT run in the user's
  26. current directory (unless that's /usr/spool/??d) and may not even
  27. run on the user's machine).  Thus, one must make sure that the
  28. printer is being spooled from the current machine, and that the
  29. full pathname of the file is specified (no tildes, please).
  30. If neither of these conditions is practical, the user will have
  31. to run dvi2ps by hand.  Here is an exaple command sequence that
  32. will format and print the dvifile pspicture.dvi on the printer
  33. "ps":
  34.  
  35.     % dvi2ps pspicture.dvi > /tmp/dvi$$ps
  36.     [1]
  37.     % cat /usr/local/lib/ps/psdvi.pro /tmp/dvi$$ps | lpr -l -Pps
  38.     % rm /tmp/dvi$$ps
  39.  
  40. Of course, these pathnames may not be right for your machine.
  41.  
  42.     See the files pspicture.tex and pspicture.latex (and tank.ps)
  43. for examples of using PostScript in a TeX ddocument.
  44.  
  45.                 John Coker
  46.                 October 1986
  47.